<%@ page language="java" import="java.util.*,mySql.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>  
   <script src="../js/jquery.min.js" type="text/javascript"></script>
  <script type="text/javascript">
var t = n =0, count;
$(document).ready(function(){ 
count=$("#banner_list a").length;
$("#banner_list a:not(:first-child)").hide();
$("#banner_info").html($("#banner_list a:first-child").find("img").attr('alt'));
$("#banner_info").click(function(){window.open($("#banner_list a:first-child").attr('href'), "_blank")});
$("#banner li").click(function() {
var i = $(this).text() -1;//获取Li元素内的值，即1，2，3，4
n = i;
if (i >= count) return;
$("#banner_info").html($("#banner_list a").eq(i).find("img").attr('alt'));
$("#banner_info").unbind().click(function(){window.open($("#banner_list a").eq(i).attr('href'), "_blank")})
$("#banner_list a").filter(":visible").fadeOut(500).parent().children().eq(i).fadeIn(1000);
document.getElementById("banner").style.background="";
$(this).toggleClass("on");
$(this).siblings().removeAttr("class");
});
t = setInterval("showAuto()", 2000);
$("#banner").hover(function(){clearInterval(t)}, function(){t = setInterval("showAuto()", 2000);});
})

function showAuto()
{
n = n >=(count -1) ?0 : ++n;
$("#banner li").eq(n).trigger('click');
}
</script>
  
  
  
  	<script>
	function test()
	{
		alert("请先登录");
	}
	</script>
  
  
  
  
    
    <title>head</title> 

	<link rel="stylesheet" type="text/css" href="../css/head.css">
  

   

  </head>
  
 <body>
   <!-- header begin -->
   <div class="header">
	<div class="top-header">
	<div class="phone">
	<ul>
	<li class="tele"></li>
	<li class="telenum">
	<p>13739477470</p>
	</li>
	</ul>
	</div>
	
	<div class="logo">
	<h1><a href="http://localhost:8080/practise/index.jsp">Welcome</a></h1>
	</div>
	
	<div class="login_shopcar">
	<%
		user_bean user=new user_bean();
		user=(user_bean)session.getAttribute("feng");
		if(user!=null)
		{
			out.print("欢迎您:"+user.getUsername());		
		%>
			<br><a href="http://localhost:8080/practise/jsp/cancel.jsp" class="cancel">注销</a>
		<% 
		}
		else
		{
	%> 
	<div class="left">
		<div class="left_1"><a href="http://localhost:8080/practise/jsp/login.jsp">Login</a></div>
	</div>
	<% }
	%>
	<div class="right">
	<%
		if(user!=null)
		{
	 %>
	<span class="shopcar_money">
	 $0.00 
	</span>
	<a href="http://localhost:8080/practise/jsp/shop_car.jsp?id=500">
	<img src="../image/bag.png"/></a>
	<%
		}		
		else
		{
	 %>
			<a onclick="test()">
		<img src="../image/bag.png"/></a>
	<%
		}
	 %>
	</div>
	</div>
</div>
   </div>
   <!-- header end -->
   
   <!-- banner begin -->
   <div class="top_banner">
   <div class="navigation">
   <ul>
   <li><a href="http://localhost:8080/practise/jsp/head.jsp">首页</a></li>
   <li><a href="http://localhost:8080/practise/index.jsp">外国菜</a></li>
   <li><a href="http://localhost:8080/practise/index.jsp">中国菜</a></li>
   <li><a href="http://localhost:8080/practise/index.jsp">外国零食</a></li>
   <li><a href="http://localhost:8080/practise/index.jsp">中国零食</a></li>
   <li><a href="http://localhost:8080/practise/index.jsp">关于我们</a></li>
   </ul>
   </div>
 
 <div class="bottom_banner">
 <div class="content_input">
 <p>关键字:</p>
 <span><a href="#"><input type="text"></a></span>
 <a href="#"><img src="../image/research.png" /></a>
 </div>

 </div>
   </div>
   <!-- banner end -->
   
   <!-- body_content begin -->
   <div class="all">
   	<div id="banner"> 
		<div id="banner_list" class="banner_list">
			<a href="http://localhost:8080/practise/index.jsp"><img src="../image/head_1.PNG"  alt="a"/></a>
			<a href="http://localhost:8080/practise/index.jsp"><img src="../image/head_2.jpg"  alt="b"/></a>
			<a href="http://localhost:8080/practise/index.jsp"><img src="../image/head_3.jpg"  alt="c"/></a>
			<a href="http://localhost:8080/practise/index.jsp"><img src="../image/head_4.jpg"  alt="d"/></a>
			<div class="head_list">
				<ul type="square">
				<li class="on">4</li>
				<li>3</li>
				<li>2</li>
				<li>1</li>
			</div>
		</ul>
		</div>
	</div>   
  </div>
   
   <!-- body_content end -->
   
   <!-- bottom begin -->
   <div class="bottom_show">
   <div class="picture_1">
 	<a href="#"></a>
   </div>
   <div class="picture_2">
 <a href="#"></a>
   </div>   
   <div class="picture_3">
  <a href="#"></a>
   </div>
    <div class="picture_4">
  <a href="#"></a>
   </div>
   
   
   </div>
      <div class="bottom_bar"></div>
   <div class="bottom_word">
	<p>航空港校区 | 四川省成都市西南航空港经济开发区学府路一段24号 | 右边610225 | 电话:028-85966502</p>
	<p>龙泉校区 | 成都市龙泉驿阳光城幸福路10号 | 邮编:610103 | 电话:028-84833333</p>
	<p>Copyringht 2003_2014 成都信息工程大学 建议使用IE8.0,1034*860以上浏览</p>
   </div>
   <!-- bottom end -->
   
  </body>
</html>
